<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Requests\PasswordRequest;
use Auth;
class PasswordController extends Controller
{
    public function edit()
    {
    	return view("home.account.password");
    }

    public function update(PasswordRequest $request)
    {
    	$request->user()->update(['password' => $request->password]);
    	Auth::logout();
    	return redirect()->route('user.loginform');
    }
}
